import time

from selenium import webdriver


def web_test():
    driver = webdriver.Chrome()
    # 打开网页
    driver.get("https://ceshiren.com")
    time.sleep(2)
    # 刷新网页
    driver.refresh()
    time.sleep(2)
    # 打开另一网页
    driver.get("https://www.baidu.com")
    # 回退
    driver.back()
    time.sleep(2)
    # 最大化
    driver.maximize_window()
    time.sleep(2)

    # 最小化
    driver.minimize_window()
    time.sleep(2)


if __name__ == '__main__':
    web_test()
